Skip to content

version.sh: include commit count since release tag in BUILD_TAG - #643

Merged
RyanTheTide merged 1 commit into
mainfrom
feat/version-commit-count
Dec 1, 2026
Merged

RyanTheTide merged 1 commit into
mainfrom
feat/version-commit-count

Conversation

@satchlj

@satchlj satchlj commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Include the commit count since v<VERSION> in version.sh so post-tag development builds emit <VERSION>-<count>-g<commit> (e.g. 1.0.0b18-68-gd8eb8ad4) instead of <VERSION>-g<commit>.

Why:

  • Two post-tag builds on the same release version (1.0.0b17-g5a244b5b vs 1.0.0b17-gc0af820e) cannot be ordered by string or commit hash alone, so Stage 2 downgrade checks previously had to treat same-release builds as equal and allowed an older packaged build to replace a newer running Stage 2.
  • The existing Stage 2 updater regex (UPDATER_PATTERN: -(?:[0-9]+-)?g[0-9a-f]+) already accepts an optional -<count>- segment, so older updaters and Stage 1 binaries continue parsing the tag unchanged.

Changes:

  • Update version.sh to count commits from v<VERSION>..HEAD when v<VERSION> is an ancestor of HEAD and emit <VERSION>-<count>-g<commit> when count > 0 (preserving exact release tags <VERSION>, AURA_VERSION_TAG overrides, and <VERSION>-g<commit> fallback when no ancestor tag is present).
  • Add test_version_sh_includes_commit_count_after_release_tag in tests/python/test_release_version.py.

Tested:

  • pytest tests/python/test_release_version.py (7 passed, including exact tag, post-tag commit count, -dirty, missing ancestor tag, and UPDATER_PATTERN matching)
  • Verified ./version.sh output on current main (#define BUILD_TAG "1.0.0b18-68-gd8eb8ad4")

Risk: two-way · Aura post-tag BUILD_TAG string only. Exact release tags and AURA_VERSION_TAG overrides are unchanged, and the emitted string matches the existing Stage 2 updater pattern.

Post-tag git builds currently emit <VERSION>-g<commit>, which gives Stage 2
updaters no way to order two builds of the same release and lets an older
packaged build silently replace a newer running Stage 2 via aura-try.

When v<VERSION> is an ancestor of HEAD and HEAD is ahead of it, emit
<VERSION>-<count>-g<commit> (the git-describe distance format already accepted
by the distributions' Stage 2 updater pattern). Exact release tags still emit
<VERSION>, and builds without an ancestor v<VERSION> tag keep <VERSION>-g<commit>.

Signed-off-by: Satya Benson <satya@benson.earth>
@satchlj
satchlj requested review from a team as code owners December 1, 2026 19:29
@satchlj
satchlj requested review from LiamRay11 and maralcbr December 1, 2026 19:29
@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks required sections (bot) labels Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Merge readiness at 31fe4e8d: not ready yet

Check Detail
CI at head no failing: pr-text / pr-text
Review ok approved by DjDeveloperr
Requested changes ok none
Hardware row at head no no line with the head SHA 31fe4e8d, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · Aura post-tag BUILDTAG string only. Exact release tags and AURAVERSIONTAG overrides are unchanged, and the emitted string matches the existing Stage 2 updater pattern.

Areas: none matched in CODEOWNERS

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@github-actions github-actions Bot added door:two-way Revertible or not, from Merge risk (bot) and removed needs-template PR body lacks required sections (bot) labels Dec 1, 2026

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran all seven release-version cases at this commit. The count is emitted for a Git checkout descended from the release tag, including dirty builds, and exact tags and archive fallback keep their old format. The existing updater pattern accepts the counted tag. Keep the Stage 2 build and hardware checks on the counted image. Fedora’s source archives still emit uncounted tags, which needs handling in the Consumer PR #601.

@github-actions github-actions Bot removed the needs-review No approving review from Core or Omarchy Mac yet (bot) label Dec 1, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging at 31fe4e8d3523 (B2 merge train, 12-01 merge bar). Approval at this head: DjDeveloperr. Row: not needed: build version string only (commit count since the release tag), no runtime change. CI: aura train A8 = main d8eb8ad + #643: gcc normal + ESP_STAGE2 build pass, CI-gcc 13.3 stage1_size pass (esp-stage2 4752 B, unchanged), pytest 1797 passed; pr-text red is lint (not a merge blocker per 12-01 rules) Revert: git revert -m 1 <merge commit>.

@RyanTheTide
RyanTheTide merged commit 0745e34 into main Dec 1, 2026
29 of 32 checks passed
@RyanTheTide
RyanTheTide deleted the feat/version-commit-count branch December 1, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants